<%--
    Document   : index
    Created on : Mar 31, 2011, 5:16:00 PM
    Author     : lab
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="dto.TourCategory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Tour Category Management</title>
    </head>
    <body>
        <a href="administrator.jsp?page=tourCate&action=add">Add a new tour category</a>
        <table>
            <tr>
                <td width="50">Tour category ID</td>
                <td width="100">Tour category name</td>
                <td width="250">Description</td>
                <td>Action</td>
            </tr>
            <%
                        ArrayList<TourCategory> tourCates = (ArrayList<TourCategory>) request.getAttribute("tourCates");
                        if (tourCates != null) {
                            for (TourCategory item : tourCates) {
            %>
            <tr>
                <td><% out.println(item.getTourCateID());%></td>
                <td><% out.println(item.getCateName());%></td>
                <td><% out.println(item.getDescription());%></td>
                <td><a href="administrator.jsp?page=tourCate&action=edit&tourCateID=<% out.println(item.getTourCateID());%>">Update</a>, <a href="administrator.jsp?page=tourCate&action=delete&tourCateID=<% out.println(item.getTourCateID());%>">Delete</a></td>
            </tr>
            <%                                }
                        }
            %>
        </table>
    </body>
</html>

